import http from "@/utils/http";

export default {
   getList: (data: HttpPayload.ClassSearch): Promise<{ total: number; list: Array<Vm.Class> }> => http<HttpPayload.ClassSearch, { total: number; list: Array<Vm.Class> }>({ url: "/class/list", method: "post", data }),
   getDictionary:():Promise<Array<Vm.Dictionary>> => http<null,Array<Vm.Dictionary>>({url:"/dictionary/list"}),
   add:(data:Vm.ClassModel):Promise<number> => http<Vm.ClassModel,number>({url:"/class/add",method:"post",data}),
   update:(data:Vm.ClassModel):Promise<null> => http<Vm.ClassModel,null>({url:"/class/update",method:"post",data}),
   begin:(data:HttpPayload.ClassUpdate):Promise<null> => http<HttpPayload.ClassUpdate>({url:"/class/begin",method:"post",data}),
   end:(data:HttpPayload.ClassUpdate):Promise<null> => http<HttpPayload.ClassUpdate>({url:"/class/end",method:"post",data}),
}